package com.yanqu.road.logic.activity.foxcard.game.effect;

import com.yanqu.road.entity.activity.foxcard.FoxEffectCard;
import com.yanqu.road.entity.activity.foxcard.FoxHandCard;
import com.yanqu.road.entity.activity.foxcard.config.FoxCardEffectCardConfig;
import com.yanqu.road.logic.activity.foxcard.game.FoxCardGameLogic;
import com.yanqu.road.logic.activity.foxcard.game.eFoxCardTriggerType;

public class FoxCardEffectBase implements FoxCardEffect {
    protected FoxCardEffectCardConfig effectConfig;
    protected FoxEffectCard effectCard;
    protected eFoxCardTriggerType triggerType;

    @Override
    public FoxCardEffect init(FoxCardEffectCardConfig effectConfig, FoxEffectCard effectCard, eFoxCardTriggerType triggerType) {
        this.effectConfig = effectConfig;
        this.effectCard = effectCard;
        this.triggerType = triggerType;
        return this;
    }
    protected void effectHandle(FoxCardGameLogic gameLogic, FoxHandCard handCard) {

    }

    @Override
    public void handle(FoxCardGameLogic gameLogic, FoxHandCard handCard) {
        effectHandle(gameLogic, handCard);
        if (triggerType == eFoxCardTriggerType.AFTER_SCORE) {
            gameLogic.dealEffectCardBuff(effectCard, triggerType);
        }
    }
}
